<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Quill Table Module Demo</title>
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, viewport-fit=cover"
    />
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"
      crossorigin="anonymous"
    />
    <script src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.snow.css" rel="stylesheet" />
    <script type="text/javascript" src="./index.umd.js"></script>
    <link href="./index.css" rel="stylesheet" />
    <link href="./table-creator.css" rel="stylesheet" />
    <style>
      .ql-editor {
        line-height: 1.4;
      }
    </style>
  </head>

  <body>
    <div style="display: flex; flex-direction: column; max-width: 1200px; margin: auto">
      <div>
        <button id="btn1">console</button>
        <button id="writable1">switch writable</button>
        <span>select cell and right click to display table operate menu</span>
        <div id="editor1" style="height: 600px"></div>
        <div id="output1"></div>
      </div>
      <div>
        <button id="btn2">console</button>
        <button id="writable2">switch writable</button>
        <span>this editor is initial readonly</span>
        <div id="editor2" style="height: 600px"></div>
        <div id="output2"></div>
      </div>
      <div>
        <button id="btn3">console</button>
        <button id="writable3">switch writable</button>
        <span>this editor will not auto merge empty row or column</span>
        <div id="editor3" style="height: 600px"></div>
        <div id="output3"></div>
      </div>
    </div>
    <script>
      const ws = new WebSocket('ws://localhost:8080');
      ws.onmessage = (event) => {
        const data = JSON.parse(event.data);
        if (data.type === 'reload') {
          window.location.reload();
        }
      };
    </script>
    <script type="module" src="./index.js"></script>
  </body>
</html>
